import { Button } from "antd";
import {} from "@ant-design/icons";
import { useNavigate } from "react-router-dom";

export default function ({ linkurl, title }: { linkurl?: string; title?: string }) {
	const navigate = useNavigate();
	return (
		<div className=' sticky top-0 z-50 bg-white h-16 border-b border-gray-200 border-solid flex items-center px-4'>
			<Button
				onClick={() => {
					navigate(linkurl || "/open");
				}}
				size='small'>
				返回
			</Button>
			<span className=' ml-4'>{title}</span>
			<p className=' w-0 flex-1 h-full electron-move'></p>
		</div>
	);
}
